Creates a package reader to read the specified package from SharePoint. The package must be valid e-learning content.The package is read using the current user's credentials.
Parent Type: SharePointPackageReader
Namespace: Microsoft.LearningComponents.SharePoint
Assembly: Microsoft.LearningComponents.SharePoint.dll
| C# |
|
public SharePointPackageReader ( ) |
cacheSettings
The settings to use for the caching of this package. A subdirectory will be created in the cacheSettings.CachePath location with a cached version of this package.
packageLocation
The location of the package to be read. Any changes to this SharePointFileLocation object after the SharePointPackageReader is created are not reflected in the behavior of this object.
| Exception type | Condition |
| ArgumentNullException | Thrown if any argument is null. |
| DirectoryNotFoundException | Thrown if the CachePath property of cacheSettings does not exist prior to calling this constructor. |
| FileNotFoundException | Thrown if the requested file does not exist. |
| UnauthorizedAccessException | Thrown if the identity doesn't have access to the CachePath provided in the cache settings. |
In addition to the exceptions listed below, this method may throw exceptions caused by the identity not having access to the cacheSettings CachePath location.
The contents of the package are not read in the constructor. The contents of the package are read only once when they are first needed. If the referenced SharePoint file does not contain a valid e-learning package, accessing other methods and properties on this object will result in an InvalidPackageException.